<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>layuiAdmin 控制台主页一</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
  <script src="/res/js/jquery-1.9.1.min.js"></script>
  <script src="/layuiadmin/layui/layui.js?t=1"></script>

  <style>

    footer {
      background-color: #222;
      color:#9d9d9d;
      padding:20px 0;
    }
  </style>
</head>
<body>
<div class="layui-fluid">

    <div class="layui-card" style="padding: 15px">
      <div class="layui-card-body">
        鲜人掌平台公告：欢迎使用新版供应商中心。
      </div>
    </div>
</div>

<div class="layui-fluid" id="app">
  <div class="layui-row layui-col-space15">
    <div class="layui-col-md12">
      <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
          <div class="layui-card">
            <div class="layui-card-header">近期订单数据</div>
            <div class="layui-card-body">

              <div class="layui-carousel layadmin-carousel layadmin-dataview" data-anim="fade"   id="main"
                   lay-filter="LAY-index-dataview">
                <div id="LAY-index-dataview" style="height: 332px">

                </div>
              </div>

            </div>
          </div>
          <div class="layui-card">
          </div>
        </div>
      </div>
    </div>


  </div>
</div>

<script src="/res/js/echarts.min.js"></script>
<script src="/res/js/wonderland.js"></script>
<script>






    // 基于准备好的dom，初始化echarts实例
   // var dataview = echarts.init(document.getElementById('LAY-index-dataview'));
    var dataview = echarts.init(document.getElementById('main'),'wonderland');
    // 指定图表的配置项和数据
    var option = {
        title: {
            text: '数据加载中...',
            x: 'center',
            textStyle: {
                fontSize: 14
            }
        },
        tooltip: { //提示框
            trigger: 'axis',
            formatter: "{b}<br>新增用户：{c}"
        },
        xAxis: [{ //X轴
            type: 'category',
            boundaryGap: false,
            data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
        }],
        yAxis: [{  //Y轴
            type: 'value'
        }],
        series: [{ //内容
            type: 'line',
            smooth: true,
            itemStyle: {normal: {areaStyle: {type: 'default'}}},
            data: [0, 0.2, 0.4, 0.6, 0.8, 1],
        }],
        color: ['#009688']

    };

    // 使用刚指定的配置项和数据显示图表。
    dataview.setOption(option);

    // //异步更新数据
    // $.get("{:url('get_order_count')}", '', function (res) {
    //
    //     var option2 = {
    //         title: {
    //             text: '',
    //             x: 'center',
    //             textStyle: {
    //                 fontSize: 14
    //             }
    //         },
    //         tooltip: { //提示框
    //             trigger: 'axis',
    //             formatter: "{b}<br>订单：{c}"
    //         },
    //         xAxis: [{ //X轴
    //             type: 'category',
    //             boundaryGap: false,
    //             data: res.data.date,   //获取当天时间之前10天的日期  展现出来
    //         }],
    //         yAxis: [{  //Y轴
    //             type: 'value'
    //         }],
    //         series: [{ //内容
    //             type: 'line',
    //             smooth: true,
    //             itemStyle: {normal: {areaStyle: {type: 'default'}}},
    //             data: res.data.count,
    //         }],
    //     };
    //     dataview.setOption(option2);
    // })

    //自动重绘
    window.onresize = dataview.resize


</script>
</body>
</html>

